using System;
using System.Windows.Forms;
using System.Drawing;

namespace HIS
{
    public class PrintForm : Form
    {
        private Button btnPrintPrescription;
        private Button btnPrintGuide;
        private Button btnPrintExamination;
        private Panel pnlPreview;
        private RadioButton rdoLocalPrint;
        private RadioButton rdoRemotePrint;

        public PrintForm()
        {
            InitializeComponents();
        }

        private void InitializeComponents()
        {
            // 窗体设置
            this.Text = "打印";
            this.Size = new Size(800, 600);
            this.StartPosition = FormStartPosition.CenterScreen;

            // 打印按钮区域
            GroupBox gbPrintButtons = new GroupBox
            {
                Text = "打印选项",
                Location = new Point(10, 10),
                Size = new Size(780, 60)
            };

            btnPrintPrescription = new Button
            {
                Text = "打印处方",
                Location = new Point(10, 25),
                Size = new Size(100, 30)
            };

            btnPrintGuide = new Button
            {
                Text = "打印导诊单",
                Location = new Point(120, 25),
                Size = new Size(100, 30)
            };

            btnPrintExamination = new Button
            {
                Text = "打印检查申请单",
                Location = new Point(230, 25),
                Size = new Size(120, 30)
            };

            gbPrintButtons.Controls.AddRange(new Control[] {
                btnPrintPrescription,
                btnPrintGuide,
                btnPrintExamination
            });

            // 打印预览区域
            GroupBox gbPreview = new GroupBox
            {
                Text = "打印预览",
                Location = new Point(10, 80),
                Size = new Size(780, 400)
            };

            pnlPreview = new Panel
            {
                Location = new Point(10, 25),
                Size = new Size(760, 365),
                BorderStyle = BorderStyle.FixedSingle
            };

            gbPreview.Controls.Add(pnlPreview);

            // 打印设置区域
            GroupBox gbPrintSettings = new GroupBox
            {
                Text = "打印设置",
                Location = new Point(10, 490),
                Size = new Size(780, 60)
            };

            rdoLocalPrint = new RadioButton
            {
                Text = "本地打印",
                Location = new Point(10, 25),
                AutoSize = true,
                Checked = true
            };

            rdoRemotePrint = new RadioButton
            {
                Text = "异地打印",
                Location = new Point(120, 25),
                AutoSize = true
            };

            gbPrintSettings.Controls.AddRange(new Control[] {
                rdoLocalPrint,
                rdoRemotePrint
            });

            // 添加控件到窗体
            this.Controls.AddRange(new Control[] {
                gbPrintButtons,
                gbPreview,
                gbPrintSettings
            });
        }
    }
} 